/*************************************************************************
    > File Name: client.cpp
    > Author: Lancer
    > Mail: 18826075768@163.com
************************************************************************/

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fstream>
#include "mymsg.pb.h"
using namespace std;

int main(){
    Im::Content msg1;
    msg1.set_id(101);
    msg1.set_str("lancer");
    fstream output("./log", ios::out | ios::trunc | ios::binary);

    if(!msg1.SerializeToOstream(&output)){
        cerr << " failed to write msg!" << endl;
        return -1;
    }
    return 0;
}